<include file="common/header" />
<script type="text/javascript" src="/javascript/region.js"></script>
<div class="main-container">
    <div class="container">
        <div class="content user-setting">
            <div class="clearfix mb25 top-title hidden-xs">
                <h1 class="text-center f18 fb">收件地址管理</h1>
                <a href="/user.html" class="ui-btn ui-btn-red ui-btn-mi btn-user-back">返回个人中心</a>
            </div>
            <div class="clearfix mb10 top-title visible-xs">
                <h1 class="text-center f18 fb">收件地址管理</h1>
                <a href="/user.html" class="btn-user-back">返回个人中心</a>
            </div>
            <div class="row visible-xs">
                <ul class="user-left-nav-min">
                    <li class="col-xs-5">
                        <a href="/user/profile.html">资料修改</a>
                    </li>
                    <li class="col-xs-5 col-xs-offset-2">
                        <a href="/user/password.html">密码修改</a>
                    </li>
                </ul>
            </div>
            <div class="row visible-xs">
                <ul class="user-left-nav-min">
                    <li class="col-xs-5">
                        <a href="/user/avatar.html">头像修改</a>
                    </li>
                    <li class="active col-xs-5 col-xs-offset-2">
                        <a href="/user/address.html">收件地址管理</a>
                    </li>
                </ul>
                <ul class="user-left-nav-min">
                    <li class="col-xs-5">
                        <a href="/user/protect.html">手机设置</a>
                    </li>
                </ul>
            </div>
            <div class="wrap-user-setting row">
                <ul class="user-left-nav col-xs-3 hidden-xs">
                    <li>
                        <a href="/user/profile.html">资料修改</a>
                    </li>
                    <li>
                        <a href="/user/password.html">密码修改</a>
                    </li>
                    <li>
                        <a href="/user/avatar.html">头像修改</a>
                    </li>
                    <li class="active">
                        <a href="/user/address.html">收件地址管理</a>
                    </li>
                    <li>
                        <a href="/user/protect.html">手机设置</a>
                    </li>
                </ul>
                <div class="col-sm-9">
                    <div style="margin-bottom: 20px;">
                        <button class="ui-btn ui-btn-blue ui-btn-mi add-address">+&nbsp;添加新地址</button>
                    </div>
                    <div class="table-responsive">
                        <table class="table table-bordered add-setting">
                            <thead>
                            <tr>
                                <th>收货人</th>
                                <th>所在地区</th>
                                <th>详细地址</th>
                                <th>邮编</th>
                                <th>电话/手机</th>
                                <th>操作</th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="list" id="vo">
                                <tr <if condition="($vo.default eq 1)">class="add-default"</if>>
                                <td>{$vo.consignee}</td>
                                <td>{$vo.province}省{$vo.city}市</td>
                                <td>{$vo.address}</td>
                                <td>{$vo.zip}</td>
                                <td>{$vo.mobile}</td>
                                <td><a class="reset-add" data-id="{$vo.id}">修改</a>|<a class="sel-address" data-id="{$vo.id}">删除</a> </td>
                                <td><if condition="($vo['default'] eq 0)"><a class="ui-btn ui-btn-blue btn-setting-add set-del-add" data-id="{$vo.id}">设为默认地址</a><else />已经是默认地址</if></td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>

    </div>
</div>
<!--添加地址-->
<div class="modal fade" id="add_address" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" id="add_address_dialog">
        <div class="modal-content">
            <button class="ui-btn ui-btn-blue btn-add-close" onclick="window.location.reload()"><i class="glyphicon glyphicon-remove"></i></button>
            <h1 class="add-header">添加新地址</h1>
            <div class="add-content">
                <div class="add-content-form">
                    <form class="ui-form" id="set-add">
                        <div class="row">
                            <label class="col-sm-2 col-sm-offset-2">收件人：</label>
                            <div class="col-sm-4">
                                <div class="ipt">
                                    <input type="text" name="consignee">
                                    <input type="hidden" name="type" id="address-type"/>
                                    <input type="hidden" name="id" id="add-id"/>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 col-sm-offset-2">手机：</label>
                            <div class="col-sm-4">
                                <div class="ipt">
                                    <input type="text" name="mobile">
                                </div>
                            </div>
                        </div>
                        <div class="row" id="add-dialog">
                            <label class="col-sm-2 col-sm-offset-2">所在地：</label>
                            <div class="ipt col-sm-4">
                                <div class="col-xs-6">
                                    <select class="form-control province-list" name="province">
                                        <option class="items" rel="0">请选择省份</option>
                                        <option class="items" data-val="安徽" rel="3">安徽</option>
                                        <option class="items" data-val="澳门" rel="396">澳门</option>
                                        <option class="items" data-val="北京" rel="52">北京</option>
                                        <option class="items" data-val="重庆" rel="394">重庆</option>
                                        <option class="items" data-val="福建" rel="4">福建</option>
                                        <option class="items" data-val="甘肃" rel="5">甘肃</option>
                                        <option class="items" data-val="广东" rel="6">广东</option>
                                        <option class="items" data-val="广西" rel="7">广西</option>
                                        <option class="items" data-val="贵州" rel="8">贵州</option>
                                        <option class="items" data-val="海南" rel="9">海南</option>
                                        <option class="items" data-val="河北" rel="10">河北</option>
                                        <option class="items" data-val="黑龙江" rel="12">黑龙江</option>
                                        <option class="items" data-val="河南" rel="11">河南</option>
                                        <option class="items" data-val="湖北" rel="13">湖北</option>
                                        <option class="items" data-val="湖南" rel="14">湖南</option>
                                        <option class="items" data-val="江苏" rel="16">江苏</option>
                                        <option class="items" data-val="江西" rel="17">江西</option>
                                        <option class="items" data-val="吉林" rel="15">吉林</option>
                                        <option class="items" data-val="辽宁" rel="18">辽宁</option>
                                        <option class="items" data-val="内蒙古" rel="19">内蒙古</option>
                                        <option class="items" data-val="宁夏" rel="20">宁夏</option>
                                        <option class="items" data-val="青海" rel="21">青海</option>
                                        <option class="items" data-val="山东" rel="22">山东</option>
                                        <option class="items" data-val="上海" rel="321">上海</option>
                                        <option class="items" data-val="山西" rel="23">山西</option>
                                        <option class="items" data-val="陕西" rel="24">陕西</option>
                                        <option class="items" data-val="四川" rel="26">四川</option>
                                        <option class="items" data-val="台湾" rel="397">台湾</option>
                                        <option class="items" data-val="天津" rel="343">天津</option>
                                        <option class="items" data-val="香港" rel="395">香港</option>
                                        <option class="items" data-val="西藏" rel="28">西藏</option>
                                        <option class="items" data-val="新疆" rel="29">新疆</option>
                                        <option class="items" data-val="云南" rel="30">云南</option>
                                        <option class="items" data-val="浙江" rel="31">浙江</option>
                                    </select>
                                </div>
                                <div class="col-xs-6">
                                    <select class="form-control city-list" name="city">
                                        <option class="items" rel="0">请选择城市</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 col-sm-offset-2">详细地址：</label>
                            <div class="col-sm-4">
                                <div class="ipt">
                                    <input type="text" name="address">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 col-sm-offset-2">邮编：</label>
                            <div class="col-sm-4">
                                <div class="ipt">
                                    <input type="text" name="zip">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="add-link text-center mt30">
                    <a class="ui-btn ui-btn-blue ui-btn-default mr30" id="save-add">保存</a>
                    <button class="ui-btn ui-btn-disabled ui-btn-default" onclick="window.location.reload()">取消</button>
                    <p class="fc-red add_tips f14 mt10"></p>
                </div>
            </div>
        </div>
    </div>
</div>
<!--添加地址end-->
<include file="common/footer" />